
<!DOCTYPE html>

<html>
  
<!-- Mirrored from docs.sympy.org/latest/modules/physics/hep/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:27:31 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>High energy physics &#8212; SymPy 1.9 documentation</title>
    <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/default.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/graphviz.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/plot_directive.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-core.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-autocomplete.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-sphinx.css" />
    
    <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
    <script src="../../../_static/jquery.js"></script>
    <script src="../../../_static/underscore.js"></script>
    <script src="../../../_static/doctools.js"></script>
    <script src="../../../../../live.sympy.org/static/utilities.js"></script>
    <script src="../../../../../live.sympy.org/static/external/classy.js"></script>
    <script src="../../../../../live.sympy.org/static/live-core.js"></script>
    <script src="../../../../../live.sympy.org/static/live-autocomplete.js"></script>
    <script src="../../../../../live.sympy.org/static/live-sphinx.js"></script>
    <script async="async" src="../../../../../cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest8331.js?config=TeX-AMS_HTML-full"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["\\(", "\\)"]], "displayMath": [["\\[", "\\]"]]}})</script>
    
    <link rel="shortcut icon" href="../../../_static/sympy-notailtext-favicon.ico"/>
    <link href="index.html" rel="canonical" />
    
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" />
    <link rel="next" title="The Physics Vector Module" href="../vector/index.html" />
    <link rel="prev" title="Physical quantities" href="../units/quantities.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../vector/index.html" title="The Physics Vector Module"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="../units/quantities.html" title="Physical quantities"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Physics</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">High energy physics</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="high-energy-physics">
<h1>High energy physics<a class="headerlink" href="#high-energy-physics" title="Permalink to this headline">¶</a></h1>
<div class="topic">
<p class="topic-title">Abstract</p>
<p>Contains docstrings for methods in high energy physics.</p>
</div>
<section id="gamma-matrices">
<h2>Gamma matrices<a class="headerlink" href="#gamma-matrices" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
</div>
<span class="target" id="module-sympy.physics.hep.gamma_matrices"></span><p>Module to handle gamma matrices expressed as tensor objects.</p>
<section id="examples">
<h3>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h3>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.hep.gamma_matrices</span> <span class="kn">import</span> <span class="n">GammaMatrix</span> <span class="k">as</span> <span class="n">G</span><span class="p">,</span> <span class="n">LorentzIndex</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.tensor.tensor</span> <span class="kn">import</span> <span class="n">tensor_indices</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">i</span> <span class="o">=</span> <span class="n">tensor_indices</span><span class="p">(</span><span class="s1">&#39;i&#39;</span><span class="p">,</span> <span class="n">LorentzIndex</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">G</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
<span class="go">GammaMatrix(i)</span>
</pre></div>
</div>
<p>Note that there is already an instance of GammaMatrixHead in four dimensions:
GammaMatrix, which is simply declare as</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.hep.gamma_matrices</span> <span class="kn">import</span> <span class="n">GammaMatrix</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.tensor.tensor</span> <span class="kn">import</span> <span class="n">tensor_indices</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">i</span> <span class="o">=</span> <span class="n">tensor_indices</span><span class="p">(</span><span class="s1">&#39;i&#39;</span><span class="p">,</span> <span class="n">LorentzIndex</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">GammaMatrix</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
<span class="go">GammaMatrix(i)</span>
</pre></div>
</div>
<p>To access the metric tensor</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">LorentzIndex</span><span class="o">.</span><span class="n">metric</span>
<span class="go">metric(LorentzIndex,LorentzIndex)</span>
</pre></div>
</div>
<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.hep.gamma_matrices.extract_type_tens">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.hep.gamma_matrices.</span></span><span class="sig-name descname"><span class="pre">extract_type_tens</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expression</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">component</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/hep/gamma_matrices.py#L43-L69"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.hep.gamma_matrices.extract_type_tens" title="Permalink to this definition">¶</a></dt>
<dd><p>Extract from a <code class="docutils literal notranslate"><span class="pre">TensExpr</span></code> all tensors with <span class="math notranslate nohighlight">\(component\)</span>.</p>
<p>Returns two tensor expressions:</p>
<ul class="simple">
<li><p>the first contains all <code class="docutils literal notranslate"><span class="pre">Tensor</span></code> of having <span class="math notranslate nohighlight">\(component\)</span>.</p></li>
<li><p>the second contains all remaining.</p></li>
</ul>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.hep.gamma_matrices.gamma_trace">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.hep.gamma_matrices.</span></span><span class="sig-name descname"><span class="pre">gamma_trace</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">t</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/hep/gamma_matrices.py#L167-L194"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.hep.gamma_matrices.gamma_trace" title="Permalink to this definition">¶</a></dt>
<dd><p>trace of a single line of gamma matrices</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.hep.gamma_matrices</span> <span class="kn">import</span> <span class="n">GammaMatrix</span> <span class="k">as</span> <span class="n">G</span><span class="p">,</span>         <span class="n">gamma_trace</span><span class="p">,</span> <span class="n">LorentzIndex</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.tensor.tensor</span> <span class="kn">import</span> <span class="n">tensor_indices</span><span class="p">,</span> <span class="n">tensor_heads</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="p">,</span> <span class="n">q</span> <span class="o">=</span> <span class="n">tensor_heads</span><span class="p">(</span><span class="s1">&#39;p, q&#39;</span><span class="p">,</span> <span class="p">[</span><span class="n">LorentzIndex</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">i0</span><span class="p">,</span><span class="n">i1</span><span class="p">,</span><span class="n">i2</span><span class="p">,</span><span class="n">i3</span><span class="p">,</span><span class="n">i4</span><span class="p">,</span><span class="n">i5</span> <span class="o">=</span> <span class="n">tensor_indices</span><span class="p">(</span><span class="s1">&#39;i0:6&#39;</span><span class="p">,</span> <span class="n">LorentzIndex</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ps</span> <span class="o">=</span> <span class="n">p</span><span class="p">(</span><span class="n">i0</span><span class="p">)</span><span class="o">*</span><span class="n">G</span><span class="p">(</span><span class="o">-</span><span class="n">i0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">qs</span> <span class="o">=</span> <span class="n">q</span><span class="p">(</span><span class="n">i0</span><span class="p">)</span><span class="o">*</span><span class="n">G</span><span class="p">(</span><span class="o">-</span><span class="n">i0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">gamma_trace</span><span class="p">(</span><span class="n">G</span><span class="p">(</span><span class="n">i0</span><span class="p">)</span><span class="o">*</span><span class="n">G</span><span class="p">(</span><span class="n">i1</span><span class="p">))</span>
<span class="go">4*metric(i0, i1)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">gamma_trace</span><span class="p">(</span><span class="n">ps</span><span class="o">*</span><span class="n">ps</span><span class="p">)</span> <span class="o">-</span> <span class="mi">4</span><span class="o">*</span><span class="n">p</span><span class="p">(</span><span class="n">i0</span><span class="p">)</span><span class="o">*</span><span class="n">p</span><span class="p">(</span><span class="o">-</span><span class="n">i0</span><span class="p">)</span>
<span class="go">0</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">gamma_trace</span><span class="p">(</span><span class="n">ps</span><span class="o">*</span><span class="n">qs</span> <span class="o">+</span> <span class="n">ps</span><span class="o">*</span><span class="n">ps</span><span class="p">)</span> <span class="o">-</span> <span class="mi">4</span><span class="o">*</span><span class="n">p</span><span class="p">(</span><span class="n">i0</span><span class="p">)</span><span class="o">*</span><span class="n">p</span><span class="p">(</span><span class="o">-</span><span class="n">i0</span><span class="p">)</span> <span class="o">-</span> <span class="mi">4</span><span class="o">*</span><span class="n">p</span><span class="p">(</span><span class="n">i0</span><span class="p">)</span><span class="o">*</span><span class="n">q</span><span class="p">(</span><span class="o">-</span><span class="n">i0</span><span class="p">)</span>
<span class="go">0</span>
</pre></div>
</div>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.hep.gamma_matrices.kahane_simplify">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.hep.gamma_matrices.</span></span><span class="sig-name descname"><span class="pre">kahane_simplify</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expression</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/hep/gamma_matrices.py#L334-L716"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.hep.gamma_matrices.kahane_simplify" title="Permalink to this definition">¶</a></dt>
<dd><p>This function cancels contracted elements in a product of four
dimensional gamma matrices, resulting in an expression equal to the given
one, without the contracted gamma matrices.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>`expression`    the tensor expression containing the gamma matrices to simplify.</strong></p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>If spinor indices are given, the matrices must be given in
the order given in the product.</p>
<p class="rubric">Algorithm</p>
<p>The idea behind the algorithm is to use some well-known identities,
i.e., for contractions enclosing an even number of <span class="math notranslate nohighlight">\(\gamma\)</span> matrices</p>
<p><span class="math notranslate nohighlight">\(\gamma^\mu \gamma_{a_1} \cdots \gamma_{a_{2N}} \gamma_\mu = 2 (\gamma_{a_{2N}} \gamma_{a_1} \cdots \gamma_{a_{2N-1}} + \gamma_{a_{2N-1}} \cdots \gamma_{a_1} \gamma_{a_{2N}} )\)</span></p>
<p>for an odd number of <span class="math notranslate nohighlight">\(\gamma\)</span> matrices</p>
<p><span class="math notranslate nohighlight">\(\gamma^\mu \gamma_{a_1} \cdots \gamma_{a_{2N+1}} \gamma_\mu = -2 \gamma_{a_{2N+1}} \gamma_{a_{2N}} \cdots \gamma_{a_{1}}\)</span></p>
<p>Instead of repeatedly applying these identities to cancel out all contracted indices,
it is possible to recognize the links that would result from such an operation,
the problem is thus reduced to a simple rearrangement of free gamma matrices.</p>
<p class="rubric">Examples</p>
<p>When using, always remember that the original expression coefficient
has to be handled separately</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.hep.gamma_matrices</span> <span class="kn">import</span> <span class="n">GammaMatrix</span> <span class="k">as</span> <span class="n">G</span><span class="p">,</span> <span class="n">LorentzIndex</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.hep.gamma_matrices</span> <span class="kn">import</span> <span class="n">kahane_simplify</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.tensor.tensor</span> <span class="kn">import</span> <span class="n">tensor_indices</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">i0</span><span class="p">,</span> <span class="n">i1</span><span class="p">,</span> <span class="n">i2</span> <span class="o">=</span> <span class="n">tensor_indices</span><span class="p">(</span><span class="s1">&#39;i0:3&#39;</span><span class="p">,</span> <span class="n">LorentzIndex</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ta</span> <span class="o">=</span> <span class="n">G</span><span class="p">(</span><span class="n">i0</span><span class="p">)</span><span class="o">*</span><span class="n">G</span><span class="p">(</span><span class="o">-</span><span class="n">i0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">kahane_simplify</span><span class="p">(</span><span class="n">ta</span><span class="p">)</span>
<span class="go">Matrix([</span>
<span class="go">[4, 0, 0, 0],</span>
<span class="go">[0, 4, 0, 0],</span>
<span class="go">[0, 0, 4, 0],</span>
<span class="go">[0, 0, 0, 4]])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">tb</span> <span class="o">=</span> <span class="n">G</span><span class="p">(</span><span class="n">i0</span><span class="p">)</span><span class="o">*</span><span class="n">G</span><span class="p">(</span><span class="n">i1</span><span class="p">)</span><span class="o">*</span><span class="n">G</span><span class="p">(</span><span class="o">-</span><span class="n">i0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">kahane_simplify</span><span class="p">(</span><span class="n">tb</span><span class="p">)</span>
<span class="go">-2*GammaMatrix(i1)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">t</span> <span class="o">=</span> <span class="n">G</span><span class="p">(</span><span class="n">i0</span><span class="p">)</span><span class="o">*</span><span class="n">G</span><span class="p">(</span><span class="o">-</span><span class="n">i0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">kahane_simplify</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
<span class="go">Matrix([</span>
<span class="go">[4, 0, 0, 0],</span>
<span class="go">[0, 4, 0, 0],</span>
<span class="go">[0, 0, 4, 0],</span>
<span class="go">[0, 0, 0, 4]])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">t</span> <span class="o">=</span> <span class="n">G</span><span class="p">(</span><span class="n">i0</span><span class="p">)</span><span class="o">*</span><span class="n">G</span><span class="p">(</span><span class="o">-</span><span class="n">i0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">kahane_simplify</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
<span class="go">Matrix([</span>
<span class="go">[4, 0, 0, 0],</span>
<span class="go">[0, 4, 0, 0],</span>
<span class="go">[0, 0, 4, 0],</span>
<span class="go">[0, 0, 0, 4]])</span>
</pre></div>
</div>
<p>If there are no contractions, the same expression is returned</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">tc</span> <span class="o">=</span> <span class="n">G</span><span class="p">(</span><span class="n">i0</span><span class="p">)</span><span class="o">*</span><span class="n">G</span><span class="p">(</span><span class="n">i1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">kahane_simplify</span><span class="p">(</span><span class="n">tc</span><span class="p">)</span>
<span class="go">GammaMatrix(i0)*GammaMatrix(i1)</span>
</pre></div>
</div>
<p class="rubric">References</p>
<p>[1] Algorithm for Reducing Contracted Products of gamma Matrices,
Joseph Kahane, Journal of Mathematical Physics, Vol. 9, No. 10, October 1968.</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.physics.hep.gamma_matrices.simplify_gpgp">
<span class="sig-prename descclassname"><span class="pre">sympy.physics.hep.gamma_matrices.</span></span><span class="sig-name descname"><span class="pre">simplify_gpgp</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ex</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sort</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/physics/hep/gamma_matrices.py#L78-L164"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.physics.hep.gamma_matrices.simplify_gpgp" title="Permalink to this definition">¶</a></dt>
<dd><p>simplify products <code class="docutils literal notranslate"><span class="pre">G(i)*p(-i)*G(j)*p(-j)</span> <span class="pre">-&gt;</span> <span class="pre">p(i)*p(-i)</span></code></p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.physics.hep.gamma_matrices</span> <span class="kn">import</span> <span class="n">GammaMatrix</span> <span class="k">as</span> <span class="n">G</span><span class="p">,</span>         <span class="n">LorentzIndex</span><span class="p">,</span> <span class="n">simplify_gpgp</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.tensor.tensor</span> <span class="kn">import</span> <span class="n">tensor_indices</span><span class="p">,</span> <span class="n">tensor_heads</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="p">,</span> <span class="n">q</span> <span class="o">=</span> <span class="n">tensor_heads</span><span class="p">(</span><span class="s1">&#39;p, q&#39;</span><span class="p">,</span> <span class="p">[</span><span class="n">LorentzIndex</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">i0</span><span class="p">,</span><span class="n">i1</span><span class="p">,</span><span class="n">i2</span><span class="p">,</span><span class="n">i3</span><span class="p">,</span><span class="n">i4</span><span class="p">,</span><span class="n">i5</span> <span class="o">=</span> <span class="n">tensor_indices</span><span class="p">(</span><span class="s1">&#39;i0:6&#39;</span><span class="p">,</span> <span class="n">LorentzIndex</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ps</span> <span class="o">=</span> <span class="n">p</span><span class="p">(</span><span class="n">i0</span><span class="p">)</span><span class="o">*</span><span class="n">G</span><span class="p">(</span><span class="o">-</span><span class="n">i0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">qs</span> <span class="o">=</span> <span class="n">q</span><span class="p">(</span><span class="n">i0</span><span class="p">)</span><span class="o">*</span><span class="n">G</span><span class="p">(</span><span class="o">-</span><span class="n">i0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">simplify_gpgp</span><span class="p">(</span><span class="n">ps</span><span class="o">*</span><span class="n">qs</span><span class="o">*</span><span class="n">qs</span><span class="p">)</span>
<span class="go">GammaMatrix(-L_0)*p(L_0)*q(L_1)*q(-L_1)</span>
</pre></div>
</div>
</dd></dl>

</section>
</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../../index.html">
              <img class="logo" src="../../../_static/sympylogo.png" alt="Logo"/>
            </a></p>
  <h3><a href="../../../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">High energy physics</a><ul>
<li><a class="reference internal" href="#gamma-matrices">Gamma matrices</a><ul>
<li><a class="reference internal" href="#examples">Examples</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="../units/quantities.html"
                        title="previous chapter">Physical quantities</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../vector/index.html"
                        title="next chapter">The Physics Vector Module</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../../_sources/modules/physics/hep/index.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="https://docs.sympy.org/latest/search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../vector/index.html" title="The Physics Vector Module"
             >next</a> |</li>
        <li class="right" >
          <a href="../units/quantities.html" title="Physical quantities"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../index.html" >Physics</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">High energy physics</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2021 SymPy Development Team.
      Last updated on Sep 30, 2021.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.1.2.
    </div>
  </body>

<!-- Mirrored from docs.sympy.org/latest/modules/physics/hep/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:27:32 GMT -->
</html>